Coder Social home page Coder Social logo

events daemon dies easily about calendar HOT 9 CLOSED

MareoRaft avatar MareoRaft commented on September 27, 2024
events daemon dies easily

from calendar.

Comments (9)

MareoRaft avatar MareoRaft commented on September 27, 2024

It could be that one of the connections within the application terminates. Like if the mongo cursor terminates, we can just create a new cursor each time we want to access db. If the google service terminates, we can just create a new service each time we want to access db. But I'm not sure the cause of the broken pipe.

from calendar.

MareoRaft avatar MareoRaft commented on September 27, 2024

branch daemon

to troubleshoot this. First I'll try getting a new google service.

from calendar.

MareoRaft avatar MareoRaft commented on September 27, 2024

Troubleshoot. First try to reproduce error:

daemon started 9:57 am...

from calendar.

MareoRaft avatar MareoRaft commented on September 27, 2024

The stacktrace says the final function in MY code is

service.events().list(...params...).execute()

So I think the google service loses connection.

from calendar.

MareoRaft avatar MareoRaft commented on September 27, 2024

I'll try to create a new google service each time...

from calendar.

MareoRaft avatar MareoRaft commented on September 27, 2024

I am now running the 'daemon' branch on the server. So if the daemon is still running on Tuesday Sept 18, we can merge this into master and consider the problem resolved.

from calendar.

MareoRaft avatar MareoRaft commented on September 27, 2024

nope. it broke again. On Sept 16, 1:48 pm....

Traceback (most recent call last):
  File "./events_daemon.py", line 25, in <module>
    main()
  File "./events_daemon.py", line 20, in main
    get_events_and_update_db()
  File "./events_daemon.py", line 13, in get_events_and_update_db
    (events, datetime_retrieved) = get_events(get_service(), cal_names=CAL_NAMES)
  File "/usr/home/freebsd/schedule/server-side/main.py", line 36, in get_events
    orderBy='startTime'
  File "/usr/local/lib/python3.6/site-packages/googleapiclient/_helpers.py", line 130, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/googleapiclient/http.py", line 840, in execute
    raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: <HttpError 503 when requesting https://www.googleapis.com/calendar/v3/calendars/gtbqdl9o6cpntqvlgnjbr6k00c%40group.calendar.google.com/events?timeMin=2018-09-16T17%3A53%3A29.499270Z&maxResults=200&singleEvents=true&orderBy=startTime&alt=json returned "Backend Error">

from calendar.

MareoRaft avatar MareoRaft commented on September 27, 2024

Now I changed it so that it's in a try block, so it will just keep trying again, even if it errors. Now we wait another 4 days to see if this works. Until Saturday, Sept. 22.

from calendar.

MareoRaft avatar MareoRaft commented on September 27, 2024

This seems to be working!

from calendar.

Related Issues (13)

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.