record_pic.py 455 B

1234567891011121314151617181920
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. """
  4. demeter service
  5. name:record_pic.py 处理摄像头的图片数据
  6. author:rabin
  7. key:pic/图片名_图片总数_当前序号/gateway/device
  8. """
  9. import time
  10. import json
  11. from demeter import *
  12. class Record_pic(object):
  13. def handle(self, config, value):
  14. print config['type']
  15. method = config['type'].split('_')
  16. name = method[0]
  17. total = method[1]
  18. index = method[2]