Native Ads Weekly Dev Update #4
Since my last update, I implemented the "ordered workflow" logic, which deals with ad operations; validating them and saving the various state changes to the DB. Here's a brief rundown on what I did:
- implemented validation checks for all ad operations (
adSubmit,adBid,adApprove,adAllocate,adReject) - implemented the ordered workflow to handle ad state (
draft,submitted,approved)
I also moved core native ad code to the hive/indexer/native_ad.py module, in two classes:
NativeAd: handles initial ad creation, content updates and other common methodsNativeAdOp: handles individual ad operations (validating ops & updating the DB)
I did this for modularity, to make integration into the indexer as easy as adding a few lines of code to the core Hivemind codebase, with most code residing in the new hive/indexer/native_ad.py module. The benefits:
- limits the code's exposure to upstream changes
- isolates local changes from the core codebase
- easier code review during future merges
- isolated debugging
You can see all the commits I made last week in the native-ads-alpha-dev branch:
https://github.com/imwatsi/hivemind/commits/native-ads-alpha-dev
This week's scope
- SQL queries that will be used to update DB state, triggered by ad operations
- tracking payments, storing them in DB, trigerring updates to ad state
- performing test operations
See my current branches on GitHub:
@tipu curate :)
Upvoted 👌 (Mana: 10/15 - need recharge?)