Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 18 lines (12 sloc) 0.675 kB
0ff7d7c @develop7 fixed typos, removed obsolete imports
develop7 authored
1 from iron_worker import *
c6cf03c @develop7 loggly example: initial python implementation
develop7 authored
2 import shutil
3
4 import hoover
5
6 #here we have to include hoover library with worker.
7 worker_dir = os.path.dirname(__file__) + '/loggly'
8 hoover_dir = os.path.dirname(hoover.__file__)
65722d9 @develop7 fixed type
develop7 authored
9 shutil.copytree(hoover_dir, worker_dir + '/loggly') #copy it to worker directory
c6cf03c @develop7 loggly example: initial python implementation
develop7 authored
10
11 worker = IronWorker(config='config.ini')
12 IronWorker.zipDirectory(directory=worker_dir, destination='loggly-py.zip', overwrite=True)
13
14 res = worker.postCode(runFilename='loggly.py', zipFilename='loggly-py.zip', name='loggly-py')
15
16 payload = {'loggly': {'subdomain': 'LOGGLY_SUBDOMAIN', 'username': 'LOGGLY_USERNAME', 'password': 'LOGGLY_PASSWORD'}}
17
18 task = worker.postTask(name='loggly-py')
Something went wrong with that request. Please try again.