+ onionr now introduces automatically
+ added daemon tools file + added .dockerignore
This commit is contained in:
parent
1ae2725319
commit
0ae052336c
4 changed files with 44 additions and 5 deletions
29
onionr/onionrdaemontools.py
Normal file
29
onionr/onionrdaemontools.py
Normal file
|
@ -0,0 +1,29 @@
|
|||
'''
|
||||
Onionr - P2P Microblogging Platform & Social network.
|
||||
|
||||
Contains the CommunicatorUtils class which contains useful functions for the communicator daemon
|
||||
'''
|
||||
'''
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
'''
|
||||
import onionrexceptions, onionrpeers
|
||||
class DaemonTools:
|
||||
def __init__(self, daemon):
|
||||
self.daemon = daemon
|
||||
|
||||
def announceNode(self):
|
||||
'''Announce our node to our peers'''
|
||||
peer = self.daemon.pickOnlinePeer()
|
||||
self.daemon.peerAction(peer, 'announce', self.daemon._core.hsAddress)
|
||||
self.daemon.decrementThreadCount('announceNode')
|
Loading…
Add table
Add a link
Reference in a new issue