Skip to content

Instantly share code, notes, and snippets.

View ryanwang520's full-sized avatar

Haowei Wang ryanwang520

  • ArcSite
View GitHub Profile
def throttle_request(redis_key, max_allow=5):
wrong_pwd_count_byte = redis.get(redis_key)
if wrong_pwd_count_byte:
wrong_pwd_count = int(wrong_pwd_count_byte)
if wrong_pwd_count >= max_allow:
raise TooManyRequests('错误次数太多,请5分钟后再尝试登录')
def incr_trial(redis_key, expire=300):
value = redis.get(redis_key)
"""
在`MessageTask`生成`ISOMessage`后,取出`IOSMessage`推送到apns,然后改变`IOSMessage`的状态
"""
import logging
from horo import Session
from horo.models import commit
from horo.models.message import IOSMessage, IOSPushError
import time
"""
在`MessageTask`生成`ISOMessage`后,取出`IOSMessage`推送到apns,然后改变`IOSMessage`的状态
"""
import concurrent
import logging
from concurrent.futures import ThreadPoolExecutor
import multiprocessing
from horo import Session
"""
在`MessageTask`生成`ISOMessage`后,取出`IOSMessage`推送到apns,然后改变`IOSMessage`的状态
"""
import concurrent
import logging
from concurrent.futures import ThreadPoolExecutor
import multiprocessing
from horo import Session
import concurrent
from concurrent.futures import ThreadPoolExecutor
import multiprocessing
from horo.models import commit
from horo.models.article import Article
messages = Article.query.offset(0).limit(3).all()
import concurrent
from concurrent.futures import ThreadPoolExecutor
import multiprocessing
from horo.models import commit
from horo.models.article import Article
messages = Article.query.offset(0).limit(3).all()
"""
在`MessageTask`生成`ISOMessage`后,取出`IOSMessage`推送到apns,然后改变`IOSMessage`的状态
"""
import concurrent
import logging
from concurrent.futures import ThreadPoolExecutor
import multiprocessing
from horo import Session
import React, { Component } from 'react';
import { Link } from 'react-router-dom'
import styled from 'styled-components';
import Delta from './PriceDelta'
const Card = styled.div`
background: #ffffff;
box-shadow:0 0 25px rgba(0, 0, 0, 0.2);
border-radius: 3px;
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC515Vj7NQeX1xOtcvoYJrwT7Df5s22u4kmnN1eiYNB60B5EJ8Nhn9TwBpRjVe8LTmzX6rZ91dGWxXHRjc2VVaNy5ibrkB4vF2CzuHGsyVkxtZY9zlwxxIutmjEavIV581VczehIKu+RmU0vut1/VgC0zwEQfRFH5iPSgAX9NhyB8CcRaTaGMRiw7NMqBJmGPYhyo4l+bN7VK/xt3o8a9nmwzxWBDKS/tO0V/+o8WL1NTlb/R2fBeu2oKLtaB2AaQplJdjsOLP1QI8UFIVRfwYvALiNToouT2vvZGCIumy9U5NmolRsqIdamkt+Wc6smj39o0zctaOtZ/eq/fand/f1 hwwangwang@gmail.com
I've just got the code and now I have some questions.
1. Is the code already deployed to the production server? If it's already deployed, what's the problem now? If not,
I have to know the difference between the current and production version, I've got no documents at all.
2. I have no idea of how the code I've got should be deployed and integrate with other system of your architecture,
the context is missing from my side, thus I need more and more information of your system.
3. Can you just list your problems as detail as possible? Actually I cannot figuire out where your search engine is broken
and get a clear understanding of the very outcome you'd like to see at the end of this month.