Sapan Bhatia | 58fa905 | 2015-09-10 11:12:04 -0400 | [diff] [blame] | 1 | import os |
| 2 | import sys |
| 3 | import base64 |
| 4 | from django.db.models import F, Q |
| 5 | from xos.config import Config |
| 6 | from observer.syncstep import SyncStep |
| 7 | from helloworld.models import Hello,World |
| 8 | from util.logger import Logger, logging |
| 9 | |
| 10 | # hpclibrary will be in steps/.. |
| 11 | parentdir = os.path.join(os.path.dirname(__file__),"..") |
| 12 | sys.path.insert(0,parentdir) |
| 13 | |
| 14 | logger = Logger(level=logging.INFO) |
| 15 | |
| 16 | class SyncWorld(SyncStep): |
| 17 | provides=[World] |
| 18 | observes=World |
| 19 | requested_interval=0 |
| 20 | |
| 21 | def sync_record(self, record): |
| 22 | open('/tmp/hello-synchronizer','w').write(record.name) |
| 23 | |
| 24 | def delete_record(self, m): |
| 25 | return |