Skip to content

Instantly share code, notes, and snippets.

@jprante
jprante / ack.txt
Last active August 29, 2015 13:55
JDBC river - start river, run each minute, select orders, put them by created column as _id into Elasticsearch, send acknowledge info back to DB - https://github.com/jprante/elasticsearch-river-jdbc
mysql> select * from ack;
+------+---------------------+------+
| n | t | c |
+------+---------------------+------+
| 1 | 2014-01-31 23:37:00 | 6 |
| 2 | 2014-01-31 23:38:00 | 6 |
| 3 | 2014-01-31 23:39:00 | 6 |
+------+---------------------+------+
3 rows in set (0.00 sec)
@justanr
justanr / _core.py
Last active December 14, 2023 02:47
Clean Architecture In Python
from abc import ABC, ABCMeta, abstractmethod
from collections import namedtuple
from itertools import count
PayloadFactory = namedtuple('PayloadFactory', [
'good', 'created', 'queued', 'unchanged', 'requires_auth',
'permission_denied', 'not_found', 'invalid', 'error'
])
"""