Giter Club home page Giter Club logo

amarillo's People

Contributors

derhuerst avatar frankgerhardt avatar hbruch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

amarillo's Issues

Remove env and agencies from config

Config currently still has agencies and env keys, which are not required any longer.

agencies are now explicitly modelled, running the enhancer only makes sense using the PROD mode so env=DEV is useless now.

Timezone support

Currently, amarillo is timezone agnostic. As trips may occure in other timezones, this should be adressed.

Remove departureTime from Carpool

Remove departureTime from Carpool, because it's a duplicate of the departureTime of the first Stop.
If both are in the schema, then both must have the same values which might not be the case always or needs extra work to enforce and check. They could be different, one of them could be null. What then? What has precendence? If there is only one departureTime there can not be any confusion. And there is always a first Stop where the time can be taken from.

Store carpool offers in sync

Currently, carpool offers are stored asynchronously. To report success/failure and to avoid race conditions with deletion detection, this should be done in sync.

Especially, when syncing an agency, sometimes the error below occurs, indicating that an offer is deleted befor the pyinotify-process_IN_CLOSE_WRITE is processed:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/threading.py", line 973, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.9/site-packages/pyinotify.py", line 1491, in run
    self.loop()
  File "/usr/local/lib/python3.9/site-packages/pyinotify.py", line 1477, in loop
    self.process_events()
  File "/usr/local/lib/python3.9/site-packages/pyinotify.py", line 1275, in process_events
    self._default_proc_fun(revent)
  File "/usr/local/lib/python3.9/site-packages/pyinotify.py", line 910, in __call__
    return _ProcessEvent.__call__(self, event)
  File "/usr/local/lib/python3.9/site-packages/pyinotify.py", line 630, in __call__
    return meth(event)
  File "/app/enhancer.py", line 30, in process_IN_CLOSE_WRITE
    with open(event.pathname, 'r', encoding='utf-8') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/app/data/carpool/ride2go/103739.json'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.