Giter Site home page Giter Site logo

apimonitor's People

Contributors

anilkumarbp avatar vyshakhbabji avatar

Watchers

 avatar  avatar

apimonitor's Issues

Subscription Class is throwing error with the AES.new()

Subscription is throwing an error inside the app :

Exception in thread Thread-5:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/threading.py", line 804, in __bootstrap_inner
    self.run()
  File "/usr/lib64/python2.7/threading.py", line 757, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/python2.7/site-packages/pubnub-3.8.3-py2.7.egg/pubnub.py", line 2554, in run
    'callback'], data)
  File "/usr/local/lib/python2.7/site-packages/pubnub-3.8.3-py2.7.egg/pubnub.py", line 2524, in _invoke
    func(get_data_for_user(data))
  File "/usr/local/lib/python2.7/site-packages/pubnub-3.8.3-py2.7.egg/pubnub.py", line 2339, in sub_callback
    chobj['name'].split('-pnpres')[0])
  File "/usr/local/lib/python2.7/site-packages/pubnub-3.8.3-py2.7.egg/pubnub.py", line 2127, in _invoke
    func(get_data_for_user(msg), channel)
  File "/home/ec2-user/APIMonitor/ringcentral/subscription/subscription.py", line 155, in callback
    self._notify(message)
  File "/home/ec2-user/APIMonitor/ringcentral/subscription/subscription.py", line 174, in _notify
    message = self._decrypt(message)
  File "/home/ec2-user/APIMonitor/ringcentral/subscription/subscription.py", line 188, in _decrypt
    obj2 = AES.new(key)
TypeError: new() takes at least 2 arguments (1 given)

Current version on the Instance

  • Python - 2.7
  • Pubnub 3.8.3-py2.7

The issue seems to be with the _decrypt(self, message) method within the subscription. Please take a look at Line 188

Use a configurable schedule to run different APIs within the monitor

Monitor should read the schedule from a config file (add a schedule section), it should not be hard-coded in the monitor.

Steps:
startup and initialize
Read schedule from config
run schedule
cleanup

Schedule config should contain which APIs to run, with what frequency, how many times total to run (or indefinitely until interrupted, or until certain datetime), what inputs to pass into each API etc.

For example see https://pymotw.com/2/sched/

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.